﻿namespace RpcCentral.Service.Model
{
    public class RemoteMsg
    {
        public RemoteMsg(string msg, string clientIp)
        {
            ClientIp = clientIp;
            _MsgBody = msg;
        }

        public string ClientIp { get; }

        private readonly string _MsgBody = null;

        public string GetMsgBody()
        {
            return _MsgBody;
        }
        public T GetMsgBody<T>()
        {
            return RpcHelper.Tools.Json<T>(_MsgBody);
        }

    }
}
